<?php
/*
 * UserLogin is extension is widget which contains form for user login
 */
class UserLogin extends CWidget
{
		public function run()
		{
		$form=new User;
		$form->setIsNewRecord(false);
		if(isset($_POST['User']))
		{
			$form->setScenario('login');
			if (isset($_POST['User']))
				$form->setAttributes($_POST['User']);
			// validate user input and redirect to previous page if valid
			if ($form->validate())// ;
				$this->controller->refresh();
		}
		$this->render('userLogin',array('form'=>$form));
		}
}
